/* Sidebar */
.sidebar {
  min-height: calc(100vh - #{$navbar-height});
  background: $sidebar-light-bg;
  font-family: $type-1;
  padding: 0;
  width: $sidebar-width-lg;
  z-index: 11;
  transition: width $action-transition-duration $action-transition-timing-function, background $action-transition-duration $action-transition-timing-function;
  -webkit-transition: width $action-transition-duration $action-transition-timing-function, background $action-transition-duration $action-transition-timing-function;
  -moz-transition: width $action-transition-duration $action-transition-timing-function, background $action-transition-duration $action-transition-timing-function;
  -ms-transition: width $action-transition-duration $action-transition-timing-function, background $action-transition-duration $action-transition-timing-function;

  .nav {
    overflow: hidden;
    flex-wrap: nowrap;
    flex-direction: column;
    padding-top: 30px;
    padding-bottom: 50px;

    .nav-item {
      .collapse {
        z-index: 999;
      }

      .collapse.show,
      .collapsing {
        background: $sidebar-light-menu-active-bg;
      }

      .nav-link {
        align-items: center;
        display: flex;
        padding: $sidebar-menu-padding;
        white-space: nowrap;
        height: $nav-link-height;
        color: $sidebar-light-menu-color;

        &[aria-expanded="true"] {
          background: $sidebar-light-menu-active-bg;
        }

        .menu-icon {
          margin-right: 1.25rem;
          width: $sidebar-icon-size;
          line-height: 1;
          .rtl & {
            margin-right: 0;
            margin-left: 1.25rem;
          }
        }

        i {
          color: $sidebar-light-menu-icon-color;

          &.menu-arrow {
            margin-left: auto;
            margin-right: 0;

            &:before {
              content: "\F35D";
              font-family: "Material Design Icons";
              font-size: 18px;
              line-height: 1;
              font-style: normal;
              vertical-align: middle;
              color: rgba($sidebar-light-menu-color,0.5);
            }
          }
        }

        .menu-title {
          color: inherit;
          display: inline-block;
          font-size: $sidebar-menu-font-size;
          line-height: 1;
          vertical-align: middle;
        }

        .badge {
          margin-left: auto;
        }

        &:hover {
          color: darken($sidebar-light-menu-color, 5%);
        }
      }

      &.nav-profile {
        background: $sidebar-profile-bg;

        .nav-link {
          font-family: $type-1;
          display: block;
          height: auto;
          padding: $sidebar-profile-padding;
        }

        .profile-image {
          position: relative;
          width: 70px;
          height: 70px;
          margin: auto;

          img {
            width: 70px;
            height: 70px;
            border-radius: 100%;
          }
        }

        .profile-name {
          margin-top: 0.75rem;
          text-align: center;

          .rtl & {
            margin-left: auto;
            margin-right: 0.75rem;
          }

          .designation,
          .name {
            font-family: $type-1;
            margin-bottom: 0;
            line-height: 1.5;
            font-weight: 500;
          }

          .name {
            color: $sidebar-light-profile-name-color;
          }

          .designation {
            color: $sidebar-light-profile-title-color;
            font-size: 0.75rem;
          }
        }

        i {
          color: color(white);
          font-size: 1rem;
          margin-left: auto;
        }
      }

      &.active {
        > .nav-link {
          color: $sidebar-light-menu-active-color;

          .menu-title,
          i {
            color: inherit;
          }
        }
      }
    }

    &:not(.sub-menu) {
      > .nav-item {
        &:hover {
          &:not(.nav-profile) {
            > .nav-link {
              background: $sidebar-light-menu-hover-bg;
              color: $sidebar-light-menu-hover-color;
            }
          }
        }
      }
    }

    &.sub-menu {
      margin-bottom: 0;
      padding: $sidebar-submenu-padding;

      .nav-item {
        .nav-link {
          color: $sidebar-light-submenu-color;
          padding: $sidebar-submenu-item-padding;
          font-size: $sidebar-submenu-font-size;
          line-height: 1;
          height: auto;

          &.active {
            color: $sidebar-light-menu-active-color;
            background: transparent;

            &:before {
              background: $sidebar-light-menu-active-color;
            }
          }
        }

        &:hover {
          > .nav-link {
            background: $sidebar-light-submenu-hover-bg;
            color: $sidebar-light-submenu-hover-color;

            &:before {
              background: $sidebar-light-submenu-hover-color;
            }
          }
        }
      }
    }
    .nav-item{
      &.purchase-button{
        text-align: center;
        margin-top: 10px;
        padding-left: 15px;
        padding-right: 15px;
        .nav-link{
          background-color: #d209fa;
          @include filter-gradient(#d209fa, #4f81d4, horizontal);
          @include background-image(linear-gradient(to right, #d209fa 1%,#4f81d4 100%));
          color: $white;
          text-align: center;
          display: block;
          font-weight: 500;
          @include border-radius(4px);
          @include transition-duration(0.3s);
          font-size: 14px;
          &:hover{
            background-color: #d209fa;
            @include filter-gradient(#d209fa, #4f81d4, horizontal);
            @include background-image(linear-gradient(to right, #d209fa 1%,#4f81d4 100%));
          }
        }
        &:hover{
          .nav-link{
            background-color: #d209fa !important;
            color: $white !important;
          }
        }
      }
    }
  }
}
/* style for off-canvas menu*/
@media screen and (max-width: 991px) {
  .sidebar-offcanvas {
    position: fixed;
    max-height: calc(100vh - #{$navbar-height});
    top: $navbar-height;
    bottom: 0;
    overflow: auto;
    right: -$sidebar-width-lg;
    -webkit-transition: all 0.25s ease-out;
    -o-transition: all 0.25s ease-out;
    transition: all 0.25s ease-out;

    &.active {
      right: 0;
    }
  }
}
